package com.xsy.middleware.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.List;

/**
 * 数据库操作
 */
public interface DbOptMapper {

    @Select("select count(1) from information_schema.TABLES where table_name = #{tableName}")
    int isTableExist(@Param("tableName") String tableName);

    void executeSql(@Param("sql") String sql);

    List<Long> selectTableIds(@Param("sql") String sql);

    List<HashMap<String, Object>> selectTableData(@Param("sql") String sql);
}
